package com.project.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 项目分类列对象 dm_project_type
 *
 * @author ruoyi
 * @date 2025-02-08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DmProjectType extends TimeUserEntity implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;


    @ApiModelProperty("编号")
    private String code;


    @ApiModelProperty("项目分类名称")
    private String name;

    @ApiModelProperty("项目分类名称层级 ")
    @Schema(description = "从最顶级到最末级的名称 如A-B-C")
    private String belongType;


    @ApiModelProperty("项目项目性质")
    @Schema(description = "项目性质（校级项目xJProject,纵向项目zXProject,横向项目yfProject）",
            allowableValues = {"xJProject", "zXProject", "yfProject"})
    private String classId;


    @ApiModelProperty("项目级别")
    private String projectLevelId;


    @ApiModelProperty("备注")
    private String note;


    @ApiModelProperty("父级分类id")
    private String upCode;


    @ApiModelProperty("中检报告限制在")
    private String allowMiddleCheckDate;


    @ApiModelProperty("允许结项日期")
    private String allowCompleteDate;


    @ApiModelProperty("是否限制报告提交")
    @Schema(description = "0:否  1:是")
    private String isProcessAlarm;


    @ApiModelProperty("项目来源")
    private String projectSourceId;


    @ApiModelProperty("支付来源")
    private String paySourceId;


    @ApiModelProperty("教育部归属统计")
    @TableField(value = "SUBJECT_CLASSID")
    private String subjectClassId;


    @ApiModelProperty("分类英文名")
    private String nameLocal;


    @ApiModelProperty("父级id")
    private String parentId;

    @ApiModelProperty("分类层级")
    private Integer typeLevel;

    @ApiModelProperty("是否有子分类")
    @Schema(description = "0:否  1:是")
    private Integer hasChildren;

    @TableField(exist = false)
    private int projectCount; // 自身项目数

    @TableField(exist = false)
    private int totalProjectCount; // 最终汇总（自己 + 子节点）


}
